package data.fake.user_data


data class UserForLogin(
    val email: String,
    val password: String
) {
    // 生成器类
    class Builder {
        private var email: String = ""
        private var password: String = "123456" // 默认密码

        fun setEmail(email: String) = apply { this.email = email }
        fun setPassword(password: String) = apply { this.password = password }

        fun build() = UserForLogin(email, password)
    }
}


val byDefaultPassword = "123456"

val fakeUserForLogin = listOf(
    UserForLogin("user1", "123456"),
    UserForLogin("user2", "123456"),

    )


object FakeUserGenerator {
    private const val DEFAULT_PASSWORD = "123456"
    private const val NUM_USERS = 10

    fun generateFakeUsers(): List<UserForLogin> {
        return List(NUM_USERS) { index ->
            val email = "user${index + 1}@example.com"
            UserForLogin.Builder()
                .setEmail(email)
                .setPassword(DEFAULT_PASSWORD)
                .build()
        }
    }
}
